package networkinstance;

public class Main7 {
    public static void main(String[] args) {
        try {
            java.net.URL url = new java.net.URL("http://www.runoob.com");
            java.net.URLConnection conn = url.openConnection();

            java.util.Map headers = conn.getHeaderFields();
            java.util.Set<String> keys = headers.keySet();
            for (String key : keys) {
                String val = conn.getHeaderField(key);
                System.out.println(key + "    " + val);
            }
            System.out.println(conn.getLastModified());
        } catch (java.io.IOException e) {
            throw new RuntimeException(e);
        }
    }
}
